---------------------------------------------------------------------------------------------------
-- func: goto
-- auth: bluekirby0
-- desc: Goes to the target player.
---------------------------------------------------------------------------------------------------

cmdprops =
{
	permission = 1,
	parameters = "s"
};

function onTrigger(player,target)
	if (target == nil) then
		player:PrintToPlayer("You must enter a valid player name.");
		return;
	end

	local targ = GetPlayerByName( target );
	if (targ ~= nil) then
		player:setPos( targ:getXPos(), targ:getYPos(), targ:getZPos(), 0, targ:getZone() );    
	else
		player:PrintToPlayer( string.format( "Player named '%s' not found!", target ) );
	end
end